package lianxi;

//将str所指的字符串正序和反序进行拼接

import java.util.Scanner;

public class test03 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String s = sc.nextLine();

        String s1 = reverse(s);
        String s2 = s+s1;
        System.out.println("最终显示："+"\n"+s2);

    }
    public static String reverse(String s){
        StringBuilder ss = new StringBuilder(s);
        ss.reverse();
        String s1 = ss.toString();
        return s1;
    }
}
